import request from '@/utils/request'

// 创建学校院系信息
export function createSchoolFaculty(data) {
  return request({
    url: '/system/school-faculty/create',
    method: 'post',
    data: data
  })
}

// 更新学校院系信息
export function updateSchoolFaculty(data) {
  return request({
    url: '/system/school-faculty/update',
    method: 'put',
    data: data
  })
}

// 删除学校院系信息
export function deleteSchoolFaculty(id) {
  return request({
    url: '/system/school-faculty/delete?id=' + id,
    method: 'delete'
  })
}

// 获得学校院系信息
export function getSchoolFaculty(id) {
  return request({
    url: '/system/school-faculty/get?id=' + id,
    method: 'get'
  })
}

// 获得学校院系信息分页
export function getSchoolFacultyPage(query) {
  return request({
    url: '/system/school-faculty/page',
    method: 'get',
    params: query
  })
}

// 导出学校院系信息 Excel
export function exportSchoolFacultyExcel(query) {
  return request({
    url: '/system/school-faculty/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
